#ifndef __TCP_H__
#define __TCP_H__

typedef struct _TCP_HEADER 
 {
   unsigned short Sport;       /* source port */
   unsigned short Dport;       /* destination port */
   unsigned long  Seq;         /* sequence number */
   unsigned long  Ack;         /* acknowledgement number */
   unsigned char  X2:4,        /* (unused) */
                  Off:4;       /* data offset */

#define TH_X2_LEN       4      /* unused field len */
#define TH_OFF_LEN      4      /* data offset field len half */
#define TH_X2_POS       3      /* lower half */
#define TH_OFF_POS      7      /* higher half */
   unsigned char  Flags;
#define TH_FIN          0x01
#define TH_SYN          0x02
#define TH_RST          0x04
#define TH_PUSH         0x08
#define TH_ACK          0x10
#define TH_URG          0x20
   unsigned short Win;         /* window */
   unsigned short Sum;         /* checksum */
   unsigned short Urp;         /* urgent pointer */
 }TCP_HEADER, *PTCP_HEADER;

typedef struct _PSEUDO_HEADER 
 {
   struct in_addr Saddr;
   struct in_addr Daddr;
   unsigned char  Zero;
   unsigned char  Protocol;
   unsigned short Length;
   TCP_HEADER     TcpHeader;
 }PSEUDO_HEADER, *PPSEUDO_HEADER;

#endif //__TCP_H__
